﻿cmake_minimum_required(VERSION 3.16)

project(CameraToupCam VERSION 2.0.0 LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Widgets LinguistTools Multimedia)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets LinguistTools Multimedia)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/..)

find_package(ToupCamSDK REQUIRED)
add_library(CameraToupCam MODULE
    ../Camera_global.h
    CameraToupCam.h
    CameraToupCam.cpp
    ../CameraCommon/IndustryCamera.h
    ../CameraCommon/DialogCameraSetup.h
 #   CameraToupCamSettingDialog.ui
 #   CameraToupCamImageProcessing.h
    CameraToupCamImageProcessing.cpp
    CameraFactory.h
    CameraFactory.cpp
)

target_link_libraries(CameraToupCam PUBLIC ${ToupCamSDK_LIBRARIES})
target_link_libraries(CameraToupCam PUBLIC Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Multimedia CameraCommon)
target_include_directories(CameraToupCam PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(CameraToupCam PRIVATE CAMERA_LIBRARY)


